package com.tts.dto;

import lombok.Data;

@Data
public class CategoryStatisticsDTO {
    private String category;
    private Integer totalBooks;
    private Integer borrowTimes;
    private Double borrowRate;  // 借阅率 = borrowTimes / totalBooks

    public Double getBorrowRate() {
        if (totalBooks == 0) return 0.0;
        return borrowTimes.doubleValue() / totalBooks.doubleValue();
    }
} 